<template>
  <div class="f-data-multiple" v-if="async">
    <el-select v-model="viewModel" multiple placeholder="选择">
      <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"/>
    </el-select>
  </div>
</template>

<script>
export default {
  model: {
    prop: 'dataModel',
    event: 'change'
  },
  props: {
    widget: {},
    dataModel: {},
    size: {}
  },
  data() {
    return {
      async: false,
      viewModel: '',
      options: [
        {
          label: '选项1',
          value: 1
        },
        {
          label: '选项2',
          value: 2
        },
        {
          label: '选项3',
          value: 3
        }
      ]
    }
  },
  mounted() {
    this.init()
  },
  methods: {
    async init() {   
      if (this.dataModel) {
        this.viewModel = this.dataModel        
      }
      this.async = true
    },
    handleCheckChange(e) {
      
    }
  }
}
</script>

<style lang="scss">
.f-data-multiple{
  .el-select{
    width: 100%;
  }
}
</style>